//
//  ViewController.m
//  UI06_homework
//
//  Created by 洛洛大人 on 16/6/13.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "ViewController.h"
#import "LlScrollView.h"
#import "PictureView.h"
@interface ViewController ()<UIScrollViewDelegate>

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self creatPictureView];
    
}

-(void)creatPictureView {
    PictureView *picture = [[PictureView alloc]initWithFrame:CGRectMake(0, 0, 300, 400)];
    picture.center = self.view.center;
    picture.backgroundColor = [UIColor redColor];
    [self.view addSubview:picture];
    [picture release];

    
   // 添加图片
     UIImage *image0 = [UIImage imageNamed:@"0000.jpeg"];
     UIImage *image1 = [UIImage imageNamed:@"1111.jpeg"];
     UIImage *image2 = [UIImage imageNamed:@"2222.jpeg"];
     UIImage *image3 = [UIImage imageNamed:@"3333.jpeg"];
    
   picture.imageArray = @[image3, image0, image1, image2, image3, image0];
    

//    [self pictureArray];
    
    

    
}

//-(NSMutableArray <UIImage *> *)pictureArray
//{
//    NSMutableArray *imageArray = [NSMutableArray array];
//    for (int i = 0; i < 4; i++) {
//        NSString *name = [NSString stringWithFormat:@"图片%d", i + 1];
//        UIImage *image = [UIImage imageNamed:name];
//        
//        [imageArray addObject:image];
//        
//    }
//    
//    UIImage *firstImage = [imageArray objectAtIndex:imageArray.count - 1];
//    UIImage *lastImage = [imageArray objectAtIndex:0];
//    [imageArray insertObject:firstImage atIndex:0];
//    [imageArray addObject:lastImage];
//    
//    return imageArray;
//}




- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}





@end
